package Java.j2;

import java.util.Scanner;

public class AcWing_670 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String word1 = scanner.nextLine();
        String word2 = scanner.nextLine();
        String word3 = scanner.nextLine();

        String animal = "";

        if(word1.equals("vertebrado")){
            if(word2.equals("ave")){
                if(word3.equals("carnivoro")){
                    animal = "aguia";
                }else if(word3.equals("onivoro")){
                    animal = "pomba";
                }
            }else if(word2.equals("mamifero")){
                if(word3.equals("onivoro")){
                    animal = "homem";
                }else if(word3.equals("herbivoro")) {
                    animal = "vaca";
                }
            }
        }else if(word1.equals("invertebrado")){
            if(word2.equals("inseto")){
                if(word3.equals("hematofago")){
                    animal = "pulga";
                }else if(word3.equals("herbivoro")){
                    animal = "lagarta";
                }
            }else if(word2.equals("anelideo")){
                if(word3.equals("hematofago")){
                    animal = "sanguessuga";
                }else if(word3.equals("onivoro")){
                    animal = "minhoca";
                }
            }
        }
        System.out.println(animal);
    }
}

